package com.jumi.microservice.constant;

import com.jumi.microservice.common.exception.BusinessExceptionAssert;

/**
 * - - - - - - - - - - - - - - -
 *
 * @author liuz
 * @date 2020/7/18 17:35
 * ToDoSomeThing
 * - - - - - - - - - - - - - - -
 */
public enum ExceptionEnum implements BusinessExceptionAssert {

    /**
     * 返回状态码集
     */
    FAIL(500, "获取数据失败"),
    FAIL_CHANGE(500,"数据转换异常"),
    FAIL_NULL(500, "获取数据为空"),
    FAIL_ID_NULL(500, "数据id为空"),
    FAIL_STOCK_BIG(500,"添加库存值大于物料库存值"),
    FAIL_SUPPLY_SPUID_NULL(500,"分仓数据中spuId为空"),
    FAIL_ORDER_SUPPLY_SKU_NULL(500,"获取sku信息为空")
    ;

    private final Integer code;

    private final String message;

    ExceptionEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }}
